package ifmo.group5512.timer;

/**
 * Created with IntelliJ IDEA.
 * User: katerina
 * Date: 01.11.12
 * Time: 12:59
 * To change this template use File | Settings | File Templates.
 */
/*
public interface Module {
    public static final String FrontOffice = "FO";
    public static final String BackOffice = "BO";
    public static final String ModelingModule = "MM";
}
*/

public enum Module {
    FrontOffice("FO"),
    ModelingModule("MM"),
    BackOffice("BO");

    private final String module;

    private Module(String module) {
        this.module = module;
    }

    public static Module parse(String str) {
        if (str.equals("FO")) {
            return FrontOffice;
        }
        if (str.equals("BO")) {
            return BackOffice;
        }
        if (str.equals("MM")) {
            return ModelingModule;
        }
        return null;
    }

    public String toString() {
        return module;
    }
}
